package com.yxy.utils;

import lombok.Data;

import java.util.List;

@Data
public class PageDataList<T> {
    //数据库总共记录数
    private long totalCounts;

    //数据库总共记录数
    private long totalPages;

    //当前第几页
    private long pageNum;

    //每页记录数
    private long pageSize;

    //翻下一页时需要前端回传的compareValue值
    private Object nextCompareValue;

    //翻上一页时需要前端回传的compareValue值
    private Object prevCompareValue;

    private List<T> list;

    public PageDataList(long totalCounts, long totalPages, long pageNum, long pageSize) {
        this.totalCounts = totalCounts;
        this.totalPages = totalPages;
        this.pageNum = pageNum;
        this.pageSize = pageSize;
    }
}
